﻿using System;
using System.Collections.Generic;

using System.Text;

namespace System.Qizx.Xdm
{
    internal static class XdmNodeExtensions
    {
        #region extensions
        internal static void SplitName(string name, out string prefix, out string localName)
        {
            int index = name.IndexOf(':');
            if (((-1 == index) || (index == 0)) || ((name.Length - 1) == index))
            {
                prefix = string.Empty;
                localName = name;
            }
            else
            {
                prefix = name.Substring(0, index);
                localName = name.Substring(index + 1);
            }
        }
        #endregion
    }
}
